<template>
  <div class="login">
    <div class="form-wrapper">
      <form action="" class="form">
        <input class="username" name="username" type="text" placeholder="username">
        <div class="line"></div>
        <input class="password" name="password" type="password" placeholder="password">
      </form>
      <div class="success-wrapper">
        <div class="success">
          <div class="icon" @click.stop.prevent="toHome">
            <i class="icon-play"></i>
          </div>
        </div>
      </div>
    </div>
    <div class="text">
      <span>forgot your password? <a @click.stop.prevent>click here</a></span>
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    toHome() {
      this.$router.push('/home')
    }
  },
  created() {
    document.querySelector('body').style.backgroundColor = '#34383d'
  }
}
</script>
<style lang="scss" scoped>
.login {
  margin: 200px auto;
  .form-wrapper {
    position: relative;
    width: 400px;
    height: 130px;
    background-color: #1c1e21;
    margin: 0 auto;
    border-radius: 20px;
    padding: 30px;
    .success-wrapper {
      position: absolute;
      top: 45px;
      right: -40px;
      width: 70px;
      height: 70px;
      border-radius: 50%;
      background-color: #34383d;
      padding: 10px;
      .success {
        position: relative;
        width: 69px;
        height: 69px;
        border-radius: 50%;
        background-color: #1c1e21;
        .icon {
          position: absolute;
          top: 17px;
          left: 22px;
          .icon-play {
            font-size: 35px;
            color: #34383d;
          }
        }
      }
    }
    .form {
      input {
        display: block;
        height: 40px;
        width: 100%;
        color: #4f5561;
        background-color: #1c1e21;
        padding: 0 10px;
        outline: none;
      }
      .line {
        margin: 20px 10px;
        height: 2px;
        background-color: #4f5561;
      }
    }
  }
  .text {
    margin: 0 auto;
    width: 400px;
    padding: 30px;
    text-align: center;
  }
}
</style>


